NewCallBack
TheNewCallback
function creates a new callback event. The callback event created at this time is not active until you schedule it by calling theCallMeWhen
function, which is described in the next section.
- WARNING
- You must not call this function at interrupt time.
pascal QTCallBack NewCallBack (TimeBase tb, short cbType);
tb
- Specifies the callback event's time base. You obtain this identifier from the
NewTimeBase
function (described on page 2-297).cbType
- Specifies when the callback event is to be invoked. The value of this field governs how the Movie Toolbox interprets the data supplied in the
param1
,param2
, andparam3
parameters to theCallMeWhen
function, which is described in the next section. The following values are valid for this parameter:callBackAtTime
- Indicates that the event is to be invoked at a specified time.
callBackAtRate
- Indicates that the event is to be invoked when the rate for the time base reaches a specified value.
callBackAtTimeJump
- Indicates that the event is to be invoked when the time base's time value changes by an amount that differs from its rate.
callBackAtExtremes
- Indicates that the event is to be invoked when the time base reaches its start time or its stop time. If the start or stop time of the time base changes, the call back is automatically rescheduled. This is very useful for looping or determining when a movie is complete. You determine when the callback is to be fired with the
triggerAtStart
andtriggerAtStop
constants. Both flags may be set.- In addition, if the high-order bit of the
cbType
parameter is set to 1 (this bit is defined by thecallBackAtInterrupt
flag), the event can be invoked at interrupt time.DESCRIPTION
TheNewCallBack
function returns a reference to the new callback event. You must provide this reference to other Movie Toolbox functions described in this section. If the Movie Toolbox cannot create the callback event, this function returnsnil
.ERROR CODES
None